'use strict';
angular.module('app').config(['$validationProvider',function($validationProvider){
	var expression = {
		phone:/^1[\d]{10}$/,
		password:function(val){
			return val.length>5;
		},
		required:function(val){
			return !!val;
		}
	};
	var defaultMsg = {
		phone : {
			success : '',
			error:'必须是11位手机号'
		},
		password:{
			success:'',
			error:'长度至少6位'
		},
		required:{
			success:'',
			error:'不能为空'
		}
	}
	$validationProvider.setExpression(expression).setDefaultMsg(defaultMsg)
}])